package com.cn.wanxi.dao.impl;

import com.cn.wanxi.dao.UserDao;
import com.cn.wanxi.model.UserModel;
import com.cn.wanxi.util.GetSqlSession;
import org.apache.ibatis.session.SqlSession;

public class UserImpl implements UserDao {
    private SqlSession sqlSession = GetSqlSession.getSqlSession();//连接数据库
    @Override
    public UserModel findByUserName(UserModel userModel) {
        UserModel model = sqlSession.selectOne("com.cn.wanxi.dao.UserDao.findByUserName", userModel);
        GetSqlSession.commit();
        return model;
    }
}
